﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;

namespace Habito.Admini
{
	public partial class Index : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if (string.IsNullOrEmpty(Ticket.UserName) || Session["username"] == null)
			{
				Response.Redirect("Login.aspx");
			}
		}
		protected override void OnInit(EventArgs e)
		{
			if (Request.QueryString["signout"] == "1")
			{
				Session["username"] = null;
				Session.Timeout = 5;
				Ticket.UserName = null;
				Ticket.LoginTime = null;
				Response.Write("1");
				Response.End();
			}
			base.OnInit(e);
		}
	}
}